public class ChangePos {
    public static void Change(int[] array){
        int i=0;
        for(i=0;i< array.length;i++){
            if(array[i]%2==0){
                int j=i;
                for(j=i;j< array.length;j++){
                    if(array[j]%2!=0){
                        int tmp=array[i];
                        array[i]=array[j];
                        array[j]=tmp;
                        break;
                    }
                }
            }
        }
    }
    public static void main(String[] args) {
        int[] array=new int[]{1,2,3,4,5};
        Change(array);
        for(int x:array){
            System.out.println(x);
        }
    }
}
